package com.lyf.scm.common.model;

import lombok.Data;

import java.io.Serializable;
import java.util.Objects;

/**
 * description:
 *          销售计划高级搜索实体类
 * @author: haodong
 * @data: 2020/8/10 15:12
 */
@Data
public class SalesPlanSelectDTO implements Serializable {

    /**
     * id
     */
    private Long id;
    /**
     * 查询code
     */
    private String code;
    /**
     * 查询name
     */
    private String name;
    /**
     * 查询层级
     */
    private Integer level;
    /**
     * 父级code
     */
    private String parentCode;

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        SalesPlanSelectDTO that = (SalesPlanSelectDTO) o;
        return code.equals(that.code) &&
                level.equals(that.level);
    }

    @Override
    public int hashCode() {
        return Objects.hash(code, level);
    }
}
